<template>
  <div>
    <div id='formio'></div>
  </div>
</template>

<script setup lang="ts">
import '@/assets/list.css'
import { Formio } from 'formiojs';
import 'formiojs/dist/formio.form.min.css'
import { onMounted } from "vue";
import Skrform from "@/components/skrform";
Formio.use(Skrform)

onMounted(() => {
  const ele = document.getElementById('formio')
  if (ele) {
    Formio.createForm(document.getElementById('formio'), {
      "components": [
        {
          "label": "收款人",
          "tableView": false,
          "redrawOn": "data",
          "key": "skrForm",
          "type": "SkrForm",
          "input": true
        }
      ]
    }, {

    }).then(form => {
      form.submission = {
        data: {
          skrForm: {
            skrFullName: '222',
            skrKhyh:'宁波银行',
            skrYhzh: '929299292',
            skrPhone: '2222222'
          }
        }
      }
      form.redraw()
    });
  }
})
</script>

<style scoped>
#formio {
  padding: 20px;
}
</style>